package com.tanhua.model.vo;

import com.tanhua.model.domain.SoulQuestion;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;

/**
 * @author fff
 * @date 2021/12/11 15:04
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class QuestionVo implements Serializable {



    private String id;//试题编号
    private String question;//题目

    /*  private String optionId;//选项编号
  private String option;//选项*/
    private List<OptionVo> options = Collections.emptyList();


    public static QuestionVo init(SoulQuestion questions
           // , List<Option> options
    ) {
        QuestionVo vo = new QuestionVo();
        BeanUtils.copyProperties(questions, vo);
      //  BeanUtils.copyProperties(options, vo);
        return vo;
    }
}
